home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1995 August: Tool Chest / Dev.CD Aug 95 TC / Dev.CD Aug 95 TC.toast / Tool Chest / Interfaces / UniversalInterfaces 1.0 / CIncludes / values.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-04-18  |  2.2 KB  |  89 lines  |  [TEXT/MPS ]

  1. /*
  2.     File:        Values.h
  3.  
  4.     Copyright:    © 1984-1993 by Apple Computer, Inc., all rights reserved.
  5.  
  6.     WARNING
  7.     This file was auto generated by the interfacer tool. Modifications
  8.     must be made to the master file.
  9.  
  10. */
  11.  
  12. #ifndef __VALUES__
  13. #define __VALUES__
  14.  
  15.  
  16. /*     
  17.     Values.h is going away completely in the future. Please use the macros 
  18.     defined in the ANSI C headers float.h and limits.h. If you previously
  19.     used the macros in Values.h , similar macros defined in float.h and 
  20.     limits.h will provide equivalent functionality in most cases.
  21.  
  22.     Old Value.h name            ANSI C name
  23.     ----------------            -----------
  24.     BITSPERBYTE         ->        CHAR_BIT
  25.     MAXSHORT             ->        SHRT_MAX
  26.     MAXINT                 ->        INT_MAX
  27.     MAXLONG                ->        LONG_MAX
  28.     MAXEXTENDED         ->        LDBL_MAX
  29.     MAXDOUBLE             ->        DBL_MAX
  30.     MAXFLOAT             ->        FLT_MAX
  31.     MINEXTENDED         ->        LDBL_MIN
  32.     MINDOUBLE             ->        DBL_MIN
  33.     MINFLOAT             ->        FLT_MIN
  34.     _EXPBASE            ->        FLT_RADIX
  35.     XMAXEXP                ->        LDBL_MAX_EXP
  36.     DMAXEXP                ->        DBL_MAX_EXP
  37.     FMAXEXP                ->        FLT_MAX_EXP
  38.     XMINEXP             ->        LDBL_MIN_EXP
  39.     DMINEXP                ->        DBL_MIN_EXP
  40.     FMINEXP             ->        FLT_MIN_EXP
  41.     XSIGNIF                ->        LDBL_MANT_DIG
  42.     DSIGNIF                ->        DBL_MANT_DIG
  43.     FSIGNIF                ->        FLT_MANT_DIG
  44. */
  45.  
  46. /*
  47.     For compatibility with previous releases, the following symbols may be
  48.     defined for 68K builds.  For future compatibility, Apple recommends that
  49.     you do not use these.
  50.     
  51.     You may supress definition of these symbols by defining the pre-processor
  52.     symbol __NO_DEFINITIONS_IN_VALUES__
  53. */
  54.  
  55. #if ! defined (powerc) && ! defined (__powerc) && ! defined (__NO_DEFINITIONS_IN_VALUES__)
  56.  
  57. #ifndef __SANE__
  58. #include <SANE.h>
  59. #endif
  60. #ifndef __LIMITS__
  61. #include <limits.h>
  62. #endif
  63. #ifndef __FLOAT__
  64. #include <float.h>
  65. #endif
  66.  
  67. #define BITS(type) (CHAR_BIT * (int)sizeof(type))
  68. #define HIBITS ((short)(1<<BITS(short)-1))
  69. #define HIBITI (1<<BITS(int)-1)
  70. #define HIBITL (1L<<BITS(long)-1)
  71. #define _IEEE 1
  72. #define _XEXPLEN 15
  73. #define _DEXPLEN 11
  74. #define _FEXPLEN 8
  75. #define _HIDDENBIT 1
  76. #define _XHIDDENBIT 0
  77. #define _LENBASE 1
  78. #define XMAXPOWTWO scalb(LDBL_MANT_DIG-1,1.0)
  79. #define DMAXPOWTWO scalb(DBL_MANT_DIG-1,1.0)
  80. #define FMAXPOWTWO scalb(FLT_MANT_DIG-1,1.0)
  81. #define LN_MAXDOUBLE log(DBL_MAX)
  82. #define LN_MINDOUBLE log(DBL_MIN)
  83. #define MAXCOMP (scalb(63,1.0)-1.0)
  84.  
  85. #endif
  86.  
  87. #endif    /* __VALUES__ */
  88.  
  89.